package com.freak.freakmusic.constants


/**
 * 常量
 *
 * @author freak
 * @date 2019/9/11.
 */

object Constants {
    /**
     * 切换服务器地址只需要修改对应的serverTYpe即可
     * DEBUG          sit测试环境（调试接口环境）
     * RELEASE        生产环境（线上服务器）
     */
    val SERVER_TYPE = "DEBUG"
    //    public final static String SERVER_TYPE = "RELEASE";


    val STORE = "STORE"
    val UO_LOGIN = "用户未登录"
    val ACCESS_TOKEN = "access_token"
    val HUAN_XIN_ID = "huan_xin_id"
    val HUAN_XIN_PWD = "huan_xin_pwd"
    val LOGIN_OUT = 10000


    /**
     * 获取服务器地址
     *
     * @param serverType
     * @return
     */
    fun getBaseUrl(serverType: String): String {
        val serverUrl: String
        when (serverType) {
            //测试服务器
            "DEBUG" -> serverUrl = "https://test.huang-dou.com/"
            //生产服务器
            "RELEASE" -> serverUrl = "https://jplife.huang-dou.com/"
            else -> serverUrl = "https://jplife.huang-dou.com/"
        }
        return serverUrl
    }
}
